<ui:composition 
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
    
    
        
        <ui:repeat value="#{aplicationBean.rubros}" var="r">
            
            <ul class="menuRubros" >
                
                <li>
                    <p:commandLink actionListener="#{buscadorBean.buscar}" ajax="false"
                                   update=":formulario,:topbarForm" process="@this,:topbarForm">
                        
                        <f:attribute name="idRurbo1" value="#{r.id}" />
                        <f:attribute name="idRurbo2" value="#{null}" />
                        
                        <f:setPropertyActionListener target="#{buscadorBean.rubro1}" value="#{r}" />
                        <f:setPropertyActionListener target="#{buscadorBean.rubro2}" value="#{null}" />
                                                
                        #{r.descripcion} 
                        
                    </p:commandLink>
                </li>   
            </ul>            
            
            <ui:repeat value="#{r.rubros}" var="r1">
                
                <ul class="menuSubRubros">
                    <li>
                        <p:commandLink actionListener="#{buscadorBean.buscar}" style="padding-left: 10px;" ajax="false"
                                       update=":formulario,:topbarForm" process="@this,:topbarForm">
                            
                            <f:attribute name="idRurbo1" value="#{r.id}" />
                            <f:attribute name="idRurbo2" value="#{r1.id}" />
                            <f:setPropertyActionListener target="#{buscadorBean.rubro1}" value="#{r}" />
                            <f:setPropertyActionListener target="#{buscadorBean.rubro2}" value="#{r1}" />
                            
                            #{r1.descripcion} 
                        </p:commandLink>                   
                    </li>
                </ul>
                
            </ui:repeat>         
            
        </ui:repeat>  
        
    
 
</ui:composition>
